package com.example.text.mapper;


import com.example.text.entity.Inware;
import com.example.text.entity.Outware;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface OutWareMapper {
    @Select("select * from outware where delete_flag=1")
    List<Outware> selectAllOrder();


    @Select("select * from outware where delete_flag=1 and Outware_order=#{OutWareOrder}")
    Outware selectByOrder(String outWareOrder);

    @Update("update outware set delete_flag=0 where Outware_id=#{OutWareId}")
    void deleteOrder(Integer OutWareId);


    @Insert("insert into outware(outware_id, outware_date, outware_ton, outware_num, outware_order,outware_money,ware_id) " +
            "values(#{OutWareId}, #{OutWareDate}, #{OutWareTon}, #{OutWareNum}, #{OutWareOrder}, #{OutWareMoney},#{WareId})")
    void insert(Outware outware);
}
